<template>
  <div>
    <!-- 顶部导航栏 -->
    <nav-top class="navtop white">个人中心</nav-top>
    <!-- 头像信息 -->
    <div class="info">
      <div class="top">
        <div class="imgs">
          <img src="../assets/images/ergeng.png" alt="" />
        </div>
        <h5>书友20210504215831427</h5>
        <span>普通</span>
      </div>
      <div class="bottom">
        <ul>
          <li>
            <span>0</span>
            <p>月票</p>
          </li>
          <li>
            <span>0</span>
            <p>推荐票</p>
          </li>
          <li>
            <span>0</span>
            <p>起点币</p>
          </li>
          <li>
            <span>充值</span>
            <p>去充值 <span class="iconfont icon-arrow-right-bold"></span></p>
          </li>
        </ul>
      </div>
    </div>
    <!-- 功能块 -->
    <div class="module">
      <ul>
        <li>
          <a href="javascript:;">
            <div class="left"><span class="my-icon"></span>消息中心</div>
            <div class="right">
              <span class="iconfont icon-arrow-right-bold"></span>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:;">
            <div class="left"><span class="my-icon"></span>会员等级</div>
            <div class="right">
              <span class="vip-grade"></span>
              <span class="iconfont icon-arrow-right-bold"></span>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:;">
            <div class="left"><span class="my-icon"></span>经验等级</div>
            <div class="right">
              <span class="grade">0级</span>
              <span class="iconfont icon-arrow-right-bold"></span>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:;">
            <div class="left"><span class="my-icon"></span>安全中心</div>
            <div class="right">
              <span class="iconfont icon-arrow-right-bold"></span>
            </div>
          </a>
        </li>
        <li>
          <a href="javascript:;">
            <div class="left"><span class="my-icon"></span>帮助中心</div>
            <div class="right">
              <span class="iconfont icon-arrow-right-bold"></span>
            </div>
          </a>
        </li>
      </ul>
    </div>
    <!-- 退出登录 -->
    <div class="log-out">
        退出登录
    </div>
  </div>
</template>

<style lang="less" scoped>
.navtop {
  width: 100%;
  position: absolute;
  color: white;
}
.info {
  .top {
    text-align: center;
    padding-top: 1.2rem;
    // padding-bottom: 0.5rem;
    background-color: #eb414a;
    color: white;
    .imgs {
      img {
        width: 15%;
        height: auto;
        border-radius: 50%;
      }
    }
    h5 {
      font-size: 0.4rem;
      margin-bottom: 3px;
    }
    span {
      width: 0.8rem;
      height: 0.36rem;
      display: inline-block;
      vertical-align: top;
      background: url("../assets/images/sprite2.png") no-repeat;
      background-size: 2.22rem 1.74rem;
      background-position: 0 -0.46rem;
      font-size: 0;
    }
  }
  .bottom {
    ul {
      display: flex;
      height: 1.7rem;
      align-items: center;
      background-color: white;
      li {
        font-size: 0.3125rem;
        flex: 1;
        text-align: center;
        span {
          font-size: 0.46rem;
        }
        p {
          color: #aaa;
        }
        &:last-child {
          align-self: stretch;
          border-left: 1px solid #eee;
          padding-top: 0.15625rem;
          position: relative;
          &::before {
            content: "";
            position: absolute;
            left: 0;
            top: 50%;
            width: 0.13rem;
            height: 0.13rem;
            border: 1px solid transparent;
            border-top-color: #eee;
            border-right-color: #eee;
            background-color: white;
            transform: translateY(-50%) translateX(-50%) rotate(45deg);
          }
          & > span {
            width: 0.77rem;
            height: 0.43rem;
            display: inline-block;
            background-image: url("../assets/images/sprite3.png");
            background-size: 2.56rem 1.76rem;
            background-position: -0.82rem -0.68rem;
            font-size: 0;
            margin-bottom: 2px;
          }
          p {
            color: #ed424b;
            span {
              font-size: 0.3125rem;
            }
          }
        }
      }
    }
  }
}
.module {
  margin-top: 0.3125rem;
  ul {
    background-color: white;
    li {
      background-color: white;
      a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 1.4rem;
        border-bottom: 1px solid #dddeee;
        font-size: 0.390625rem;
        margin-left: 0.3125rem;
        padding-right: 0.3125rem;
        box-sizing: border-box;
      }
      &:active {
        background-color: #eee;
      }
      .left {
        font-weight: bold;
        span {
          width: 0.4rem;
          height: 0.5rem;
          vertical-align: middle;
          margin-right: 0.3125rem;
          display: inline-block;
          background: url("../assets/images/sprite3.png") no-repeat;
          background-size: 2.56rem 1.76rem;
          background-position: -2.17rem 0;
        }
      }
      .right {
        font-size: 0;
        span {
          font-size: 0.46875rem;
          color: #aaa;
          &.grade {
            font-size: 0.38rem;
            margin-right: 0.3rem;
          }
          &.vip-grade {
            width: 0.8rem;
            height: 0.36rem;
            display: inline-block;
            background: url("../assets/images/sprite2.png") no-repeat;
            background-size: 2.22rem 1.74rem;
            background-position: 0 -0.46rem;
            font-size: 0;
            margin-right: 0.3rem;
          }
        }
      }
      &:nth-child(2) {
        .left {
          span {
            background-position: 0 -1.35rem;
          }
        }
      }
      &:nth-child(3) {
        .left {
          span {
            background-position: -1.64rem 0;
          }
        }
      }
      &:nth-child(4) {
        .left {
          span {
            background-position: -2.17rem -0.53rem;
          }
        }
      }
      &:nth-child(5) {
        a{
          border: none;
        }
        .left {
          span {
            background-position: -2.17rem -1.06rem;
          }
        }
      }
    }
  }
}
.log-out{
  margin-top: .3125rem;
  text-align: center;
  font-size: .390625rem;
  color: #ed424b;
  background-color: white;
  padding: 0.34rem 0;
  &:active{
    background-color: #eee;
  }
}
</style>